home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / as / dist / Makefile < prev    next >
Encoding:
Makefile  |  1989-08-30  |  8.5 KB  |  266 lines

  1. # Makefile for GAS.
  2. # Copyright (C) 1989, Free Software Foundation
  3. # This file is part of GAS, the GNU Assembler.
  4. # GAS is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 1, or (at your option)
  7. # any later version.
  8. # GAS is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with GAS; see the file COPYING.  If not, write to
  14. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  
  16. # This makefile may be used to make the VAX, 68020, 80386, 
  17. # SPARC, or ns32k assembler(s).
  18.  
  19. # If you are on a BSD system, un-comment the next two lines, and comment out
  20. # the lines for SystemV and HPUX below
  21. CFLAGS = -g -I.
  22. LDFLAGS = $(CFLAGS)
  23. # To compile gas on a System Five machine, comment out the two lines above
  24. # and un-comment out the next three lines
  25. # Comment out the -lPW on the LOADLIBES line if you are using GCC.
  26. # CFLAGS = -g -I. -DUSG
  27. # LDFLAGS = $(CFLAGS)
  28. # LOADLIBES = -lmalloc -lPW
  29. # To compile gas for HPUX, link m-hpux.h to m68k.h , and un-comment the
  30. # next two lines.  (If you are using GCC, comment out the alloca.o part)
  31. # (Get alloca from the emacs distribution, or use GCC.)
  32. # CFLAGS = -g -I. -DUSG
  33. # LOADLIBES = alloca.o
  34.  
  35. # If you just want to compile the vax assembler, type 'make avax'
  36.  
  37. # If you just want to compile the i386 assembler, type 'make a386'
  38.  
  39. # If you just want to compile the ns32k assembler, type 'make a32k'
  40.  
  41. # If you just want to compile the sparc assembler, type 'make asparc'
  42.  
  43. # If you just want to compile the mc68020 assembler, make sure m68k.h
  44. # is correctly set up, and type type 'make a68'  (Except on HPUX machines,
  45. # where you will have to make the changes marked below before typing
  46. # 'make a68'
  47. # m68k.h should be a symbolic or hard-link to one of
  48. # m-sun3.h , m-hpux.h or m-generic.h
  49. # depending on which machine you want to compile the 68020 assembler for.
  50. #
  51. # If you machine does not have vfprintf, but does have _doprnt(),
  52. # remove the # from the -DNO_VARARGS line below.
  53. #
  54. # To include the mc68851 mmu coprocessor instructions in the 68020 assembler,
  55. # remove the # from the -Dm68851 line below.
  56. #
  57. # If you want the 80386 assembler to correctly handle fsub/fsubr and fdiv/fdivr
  58. # opcodes (unlike most 80386 assemblers), remove the # from
  59. # the -DNON_BROKEN_WORDS line below.
  60.  
  61. O1 =  -DNO_VARARGS
  62. O2 = # -DNON_BROKEN_WORDS
  63. O3 = # -Dm68851
  64.  
  65. OPTIONS = $(O1) $(O2) $(O3)
  66.  
  67. #
  68. # To make the 68020 assembler compile as the default, un-comment the next
  69. # line, and comment out all the other lines that start with DEFAULT_GAS
  70. DEFAULT_GAS=a68
  71. #
  72. # To make the VAX assembler compile as the default, un-comment the next
  73. # line and commment out all the other lines that start with DEFAULT_GAS
  74. #DEFAULT_GAS=avax
  75. #
  76. # To make the 80386 assembler compile as the default, un-comment the next
  77. # line and commment out all the other lines that start with DEFAULT_GAS
  78. #DEFAULT_GAS=a386
  79. #
  80. # To make the ns32k assembler compile as the default, un-comment the next
  81. # line and commment out all the other lines that start with DEFAULT_GAS
  82. #DEFAULT_GAS=a32k
  83. #
  84. # To make the sparc assembler compile as the default, un-comment the next
  85. # line and commment out all the other lines that start with DEFAULT_GAS
  86. #DEFAULT_GAS=asparc
  87.  
  88. # Global Sources -------------------------------------------------------------
  89.  
  90. a =\
  91. as.o        xrealloc.o    xmalloc.o    hash.o        hex-value.o   \
  92. atof-generic.o    append.o    messages.o    expr.o        app.o         \
  93. frags.o        input-file.o    input-scrub.o    output-file.o                  \
  94. subsegs.o    symbols.o                    version.o     \
  95. flonum-const.o    flonum-copy.o    flonum-mult.o    strstr.o    bignum-copy.o \
  96. gdb.o        gdb-file.o    gdb-symbols.o    gdb-blocks.o    obstack.o     \
  97. gdb-lines.o
  98.  
  99. a:    $(DEFAULT_GAS)
  100.     @rm -f a
  101.     @ln $(DEFAULT_GAS) a
  102.  
  103. # SPARC GAS ------------------------------------------------------------------
  104. v = sparc.o  atof-m68k.o  write-sparc.o  read-sparc.o
  105.  
  106. V = sparc.c  sparc.h  sparc-opcode.h
  107.  
  108. atof-m68k.o:    flonum.h
  109. sparc.o:    sparc.c sparc.h sparc-opcode.h as.h frags.h struc-symbol.h
  110. sparc.o:    flonum.h expr.h hash.h md.h write.h read.h symbols.h
  111.     $(CC) -c $(CFLAGS) -DSPARC sparc.c
  112.  
  113. write-sparc.o:    write.c
  114.     $(CC) -c -DSPARC $(CFLAGS) write.c
  115.     mv write.o write-sparc.o
  116.  
  117. read-sparc.o: read.c
  118.     $(CC) -c -DSPARC $(CFLAGS) read.c
  119.     mv read.o read-sparc.o
  120.  
  121. asparc: $a $v
  122.     $(CC) -o asparc $(LDFLAGS) $a $v $(LOADLIBES)
  123.  
  124. # NS32K GAS ------------------------------------------------------------------
  125. w = ns32k.o  atof-ns32k.o  write-ns32k.o  read-ns32k.o
  126.  
  127. W = ns32k.c atof-ns32k.c ns32k-opcode.h
  128.  
  129. atof-ns32k.o:    flonum.h
  130. ns32k.o:    as.h frags.h struc-symbol.h flonum.h expr.h md.h hash.h
  131. ns32k.o:    write.h symbols.h ns32k-opcode.h
  132.  
  133. write-ns32k.o:    write.c
  134.     $(CC) -c -DNS32K $(CFLAGS) write.c
  135.     mv write.o write-ns32k.o
  136.  
  137. read-ns32k.o:
  138.     $(CC) -c -DNS32K $(CFLAGS) read.c
  139.     mv read.o read-ns32k.o
  140.  
  141. a32k: $a $w
  142.     $(CC) -o a32k $(LDFLAGS) $a $w $(LOADLIBES)
  143.  
  144. # 80386 GAS ------------------------------------------------------------------
  145. x = i386.o  atof-i386.o  write.o  read.o
  146.  
  147. X = i386.c  atof-i386.c  i386.h  i386-opcode.h
  148.  
  149. i386.o:        i386.c as.h read.h flonum.h frags.h struc-symbol.h expr.h
  150. i386.o:        symbols.h hash.h md.h i386.h i386-opcode.h
  151.     $(CC) $(CFLAGS) $(OPTIONS) -c i386.c
  152.  
  153. atof-i386.o:    flonum.h
  154.  
  155. a386: $a $x
  156.     $(CC) -o a386 $(LDFLAGS) $a $x $(LOADLIBES)
  157.  
  158. # 68020 GAS ------------------------------------------------------------------
  159. y = m68k.o  atof-m68k.o  write.o  read.o
  160.  
  161. Y = m68k.c atof-m68k.c m68k-opcode.h m-hpux.h m-sun3.h m-generic.h
  162.  
  163. atof-m68k.o:    flonum.h
  164. m68k.o:        m68k.c a.out.h as.h expr.h flonum.h frags.h hash.h
  165. m68k.o:        m68k-opcode.h m68k.h md.h obstack.h struc-symbol.h
  166.     $(CC) $(CFLAGS) $(OPTIONS) -c m68k.c
  167.  
  168. a68: $a $y
  169.     $(CC) -o a68 $(LDFLAGS) $a $y $(LOADLIBES)
  170.  
  171. # VAX GAS --------------------------------------------------------------------
  172. z = vax.o  atof-vax.o  write.o  read.o
  173.  
  174. Z = vax.c atof-vax.c vax-opcode.h vax-inst.h    make-gas.com objrecdef.h vms.c
  175.  
  176. vax.o:        vax.c a.out.h as.h expr.h flonum.h frags.h md.h obstack.h
  177. vax.o:        read.h struc-symbol.h symbols.h vax-inst.h vax-opcode.h
  178. atof-vax.o:    as.h flonum.h read.h
  179.  
  180. avax:    $a $z
  181.     $(CC) -o avax $(LDFLAGS) $a $z $(LOADLIBES)
  182.  
  183. # global files ---------------------------------------------------------------
  184.  
  185. messages.o: messages.c
  186.     $(CC) $(CFLAGS) $(OPTIONS) -c messages.c
  187.  
  188. hash.o:    hash.c
  189.     $(CC) $(CFLAGS) -Derror=as_fatal -c hash.c
  190.  
  191. xmalloc.o:    xmalloc.c
  192.     $(CC) $(CFLAGS) -Derror=as_fatal -c xmalloc.c
  193.  
  194. xrealloc.o:    xrealloc.c
  195.     $(CC) $(CFLAGS) -Derror=as_fatal -c xrealloc.c
  196.  
  197. A =\
  198. as.c        xrealloc.c    xmalloc.c    hash.c        hex-value.c \
  199. atof-generic.c    append.c    messages.c    expr.c        bignum-copy.c \
  200. frags.c        input-file.c    input-scrub.c    output-file.c    read.c \
  201. subsegs.c    symbols.c    write.c                strstr.c \
  202. flonum-const.c    flonum-copy.c    flonum-mult.c    app.c        version.c \
  203. gdb.c        gdb-file.c    gdb-symbols.c    gdb-blocks.c    obstack.c \
  204. gdb-lines.c
  205.  
  206. H = \
  207. a.out.h        as.h        bignum.h    expr.h        flonum.h \
  208. frags.h        hash.h        input-file.h    md.h     \
  209. obstack.h    read.h        struc-symbol.h    subsegs.h    \
  210. symbols.h    write.h
  211.  
  212. gas-dist.tar: COPYING README ChangeLog $A $H $Z $Y $X $W $V Makefile
  213.     -rm -r gas-dist
  214.     mkdir gas-dist
  215.     ln COPYING README ChangeLog $A $H $Z $Y $X $W $V Makefile gas-dist
  216.     tar cvhf gas-dist.tar gas-dist
  217.  
  218. gas-dist.tar.Z:    gas-dist.tar
  219.     compress < gas-dist.tar > gas-dist.tar.Z
  220.  
  221. clean:
  222.     rm -f a avax a68 a386 a32k asparc $a $v $w $x $y $z a core gmon.out bugs a.out
  223.  
  224. dist:    gas-dist.tar gas-dist.tar.Z
  225.  
  226. install:    a
  227.     cp a /usr/local/bin/gas
  228.  
  229.  
  230. # General .o-->.h dependencies
  231.  
  232. app.o:        as.h
  233. as.o:        a.out.h as.h read.h struc-symbol.h write.h
  234. atof-generic.o:    flonum.h
  235. bignum-copy.o:    bignum.h
  236. expr.o:        a.out.h as.h expr.h flonum.h obstack.h read.h struc-symbol.h
  237. expr.o:         symbols.h
  238. flonum-const.o:    flonum.h
  239. flonum-copy.o:    flonum.h
  240. flonum-mult.o:    flonum.h
  241. flonum-normal.o:flonum.h
  242. flonum-print.o:    flonum.h
  243. frags.o:    a.out.h as.h frags.h obstack.h struc-symbol.h subsegs.h
  244. gdb.o:        as.h
  245. gdb-blocks.o:    as.h
  246. gdb-lines.o:    as.h frags.h obstack.h
  247. gdb-symbols.o:    a.out.h as.h struc-symbol.h
  248. hash.o:        hash.h
  249. input-file.o:    input-file.h
  250. input-scrub.o:    as.h input-file.h read.h
  251. messages.o:    as.h
  252. obstack.o:    obstack.h
  253. read.o:        a.out.h as.h expr.h flonum.h frags.h hash.h md.h obstack.h
  254. read.o:        read.h struc-symbol.h symbols.h
  255. subsegs.o:    a.out.h as.h frags.h obstack.h struc-symbol.h subsegs.h write.h
  256. symbols.o:    a.out.h as.h frags.h hash.h obstack.h struc-symbol.h symbols.h
  257. write.o:    a.out.h as.h md.h obstack.h struc-symbol.h subsegs.h
  258. write.o:    symbols.h write.h
  259.  
  260. flonum.h:                    bignum.h
  261.  
  262.